package com.alumni_circle.service.gossip.impl;

import com.alumni_circle.core.service.Impl.BaseServiceImpl;
import com.alumni_circle.entity.gossip.Gossip;
import com.alumni_circle.entity.gossip.VO.GossipViewVO;
import com.alumni_circle.mapper.gossip.GossipMapper;
import com.alumni_circle.service.gossip.IGossipService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 龙小虬
 * @since 2020-07-06 22:34
 */
@Service
public class GossipServiceImpl extends BaseServiceImpl<GossipMapper, Gossip> implements IGossipService {
    @Resource
    private GossipMapper gossipMapper;

    @Override
    public List<GossipViewVO> searchMyListGossip(String id, String search) {
        return gossipMapper.searchMyListGossip(id,search);
    }

    @Override
    public List<GossipViewVO> selectListGossip() {
        return gossipMapper.selectListGossip();
    }

    @Override
    public List<GossipViewVO> selectMyListGossip(String id) {
        return gossipMapper.selectMyListGossip(id);
    }

    @Override
    public void updateComments(String id) {
        gossipMapper.updateComments(id);
    }

    @Override
    public void updateGossipViews(String id) {
        gossipMapper.updateGossipViews(id);
    }

    @Override
    public void updateGossipPraise(String id) {
        gossipMapper.updateGossipPraise(id);
    }
}
